import React, { Suspense } from "react"
import "@/index.less"
// 引入Loading组件
import Loading from "./components/Loading"
import { useRoutes } from "react-router-dom"
// 引入路由表
import routes from "@/router"
// 引入头部组件
import Header from "@/layout/header"
// 引入播放组件
import AppPlayer from "@/layout/AppPlayer"

function App() {
	const routelist = useRoutes(routes)
	return (
		<div className="App">
			<Header />
			<Suspense fallback={<Loading />}>{routelist}</Suspense>
			<AppPlayer />
		</div>
	)
}
export default App
